<?php
class tgyuan_areaModel extends model{
	public $base;
	public function __construct(&$base){
		parent::__construct($base);
		$this->base=$base;
		$this->table="tgyuan_area";
	}
	
	 
	
	 function getShopIds($option){
		 $data=$this->select($option);
		 $ids=array();
		 if($data){
			foreach($data as $v){
				$scids[]=$v['sc_id'];			
			}
			$ids=M("ymdian")->selectCols(array(
				"fields"=>"id",
				
				"where"=>" sc_id in("._implode($scids).")"
			));
			return $ids;
		 }
	 }
	 
}

?>